package com.monlyu.action.user;

import java.util.List;

import com.monlyu.action.PageAction;
import com.monlyu.bean.Pages;
import com.monlyu.bo.RoleBo;
import com.monlyu.bo.UserBo;
import com.monlyu.vo.Role;
import com.monlyu.vo.User;

/********************************************************************************
 * 
 * <b>功能描述☞</b><br>
 * 
 * <b>开发公司☞</b>重庆唯尼科技有限公司<br>
 * <b>版权☞</b>本文件归重庆唯尼科技有限公司所有<br>
 * <b>项目名☞</b>NewsSys<br>
 * <b>文件路径☞</b>com.monlyu.action.user.SearchUserAction.java<br>
 * <b>开发日期☞</b>2010-2-23 <br>
 * 
 * @author zengjun
 * @since JDK 5
 * @version 1.0.8
 * 
 ********************************************************************************/
public class SearchUserAction extends PageAction {

	private UserBo userBo;

	private Pages<User> users;

	private List<Role> roles;

	private RoleBo roleBo;

	private User user;

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String execute() {
		users = userBo.searchUser(user,getDefPage());
		roles = roleBo.getRollList();
		return view("searchUser.jsp");
	}

	public String toSearch() {
		roles = roleBo.getRollList();
		return view("searchUser.jsp");
	}

	public Pages<User> getUsers() {
		return users;
	}

	public List<Role> getRoles() {
		return roles;
	}

	public void setUserBo(UserBo userBo) {
		this.userBo = userBo;
	}

	public void setRoleBo(RoleBo roleBo) {
		this.roleBo = roleBo;
	}
}
